A personal audio device, such as a wireless telephone, includes an adaptive noise canceling (ANC) circuit that adaptively generates an anti-noise signal from a reference microphone signal and injects the anti-noise signal into the speaker or other transducer output to cause cancellation of ambient audio sounds. An error microphone is also provided proximate the speaker to measure the ambient sounds and transducer output near the transducer, thus providing an indication of the effectiveness of the noise canceling. A processing circuit uses the reference and/or error microphone, optionally along with a microphone provided for capturing near-end speech, to determine whether the ANC circuit is incorrectly adapting or may incorrectly adapt to the instant acoustic environment and/or whether the anti-noise signal may be incorrect and/or disruptive and then takes actions in the processing circuit to prevent or remedy such conditions.
Examples of such adaptive noise cancellation systems are disclosed in published U.S. Patent Application 2012/0140943, published on Jun. 7, 2012, and in published U.S. Patent Application 2012/0207317, published on Aug. 16, 2012, both of which are incorporated herein by reference. Both of these references are assigned to the same assignee as the present application and name at least one inventor in common and thus are not prior art to the present application, but are provided to facilitate the understating of ANC circuits as applied in the field of use.
Referring now to FIG. 1, a wireless telephone 10 is illustrated in accordance with an embodiment of the present invention is shown in proximity to a human ear 5. Wireless telephone 10 includes a transducer, such as speaker SPKR that reproduces distant speech received by wireless telephone 10, along with other local audio events such as ring tones, stored audio program material, injection of near-end speech (i.e., the speech of the user of wireless telephone 10) to provide a balanced conversational perception, and other audio that requires reproduction by wireless telephone 10, such as sources from web-pages or other network communications received by wireless telephone 10 and audio indications such as battery low and other system event notifications. A near-speech microphone NS is provided to capture near-end speech, which is transmitted from wireless telephone 10 to the other conversation participant(s).
Wireless telephone 10 includes adaptive noise canceling (ANC) circuits and features that inject an anti-noise signal into speaker SPKR to improve intelligibility of the distant speech and other audio reproduced by speaker SPKR. A reference microphone R is provided for measuring the ambient acoustic environment and is positioned away from the typical position of a user's/talker's mouth, so that the near-end speech is minimized in the signal produced by reference microphone R. A third microphone, error microphone E, is provided in order to further improve the ANC operation by providing a measure of the ambient audio combined with the audio reproduced by speaker SPKR close to ear 5, when wireless telephone 10 is in close proximity to ear 5. Exemplary circuit 14 within wireless telephone 10 includes an audio CODEC integrated circuit 20 that receives the signals from reference microphone R, near speech microphone NS, and error microphone E and interfaces with other integrated circuits such as an RF integrated circuit 12 containing the wireless telephone transceiver.
In general, the ANC techniques measure ambient acoustic events (as opposed to the output of speaker SPKR and/or the near-end speech) impinging on reference microphone R, and by also measuring the same ambient acoustic events impinging on error microphone E, the ANC processing circuits of illustrated wireless telephone 10 adapt an anti-noise signal generated from the output of reference microphone R to have a characteristic that minimizes the amplitude of the ambient acoustic events at error microphone E. Since acoustic path P(z) (also referred to as the Passive Forward Path) extends from reference microphone R to error microphone E, the ANC circuits are essentially estimating acoustic path P(z) combined with removing effects of an electro-acoustic path S(z) (also referred to as Secondary Path) that represents the response of the audio output circuits of CODEC IC 20 and the acoustic/electric transfer function of speaker SPKR including the coupling between speaker SPKR and error microphone E in the particular acoustic environment, which is affected by the proximity and structure of ear 5 and other physical objects and human head structures that may be in proximity to wireless telephone 10, when wireless telephone is not firmly pressed to ear 5.
Such adaptive noise cancellation (ANC) systems may employ a Root Mean Square (rms) detector to detect average background noise levels. Such an RMS detector needs to track background noise levels slowly but not so slowly as to become insensitive to environmental variations. An ideal RMS detector should be robust to speech presence, robust to scratching (contact) on the microphone, robust to wind noise, and a have a low computational complexity. For the purposes of describing the present ambient noise RMS detector, the lower case rms variable is utilized to refer to the prior art techniques and the upper case RMS to represent the corrected signal of the present ambient noise RMS detector, as set forth below. The present ambient noise RMS detector may utilize the prior art rms value in generating the RMS signal.
Perhaps the most well-known background noise estimation method, based on minimum statistics, was the rms detector introduced by Ranier Martin. See, Martin, Ranier, Noise Power Spectral Density Estimation Based on Optimal Smoothing and Minimum Statistics, IEEE Transactions on Speech and Audio Processing, Col. 9, No, 5, July 2001, incorporated herein by reference, as well as Martin, Ranier, Spectral Subtraction Based on Minimum Statistics, in Proc. 7th EUSIPCO '94, Edinburgh, U.K., Sep. 13-16, 1994, pp/. 1182-1195, also incorporated herein by reference. Israel Cohen has made another RMS detector based on the Martin design. See, Cohen, Israel, Noise Spectrum Estimation in Adverse Environments: Improved Minima Controlled Recursive Averaging, IEEE Transactions on Speech and Audio Processing, Vol. 11, Issue 5, September 2003, incorporated herein by reference as well as Cohen, Israel, Noise Estimation by Minima Controlled Recursive Averaging for Robust Speech Enhancement, IEEE Signal Processing Letters, Vol. 9, No. 1, January 2002, also incorporated herein by reference. Both the Martin and Cohen methods and designs employ a method to track the minimum RMS value. Both methods also use a first-order regressor with a variable smoothing factor.
The Cohen design may be less complex compared and provides better performance compared to the Martin design. The Cohen design depends on a couple of thresholds and parameters that should be adjusted for different applications. The Cohen design also uses less memory than the Martin design in that previous values of rms are kept to find the minimum value. The problem with the Cohen design is that it is susceptible to non-stationary noise such as spike noise. For example, when used in an adaptive noise cancellation system (ANC) on a cellular phone or the like, spike noise such as wind noise or scratching (user's/talker's hand scratching or rubbing the case) may create spikes to which the Cohen design would over-react. As a result, the performance of an ANC system, for example, in a cellular telephone or the like, may be degraded, as the rms detector over-reacts to these spike noises.
A simple rms detector based on a first order regression may produce an output illustrated in FIG. 2. This first order regression may be calculated as shown in equation (1):
                                          rms            ⁡                          (              n              )                                =                                                    (                                  1                  -                  α                                )                            ·                              rms                ⁡                                  (                                      n                    -                    1                                    )                                                      +                          α              ·                                                                input                  ⁡                                      (                    n                    )                                                                                                      ⁢                                  ⁢                  α          =                      {                                                                                α                    att                                                                                                                                    input                                                              >                                          rms                      ⁡                                              (                                                  n                          -                          1                                                )                                                                                                                                                              α                    dec                                                                    else                                                                                        (        1        )            where α represents a smoothing factor, rms(n) represents the rms value for the sample n and input(n) represents the input signal for sample n, and n is a sample integer number. Thus, the rms value in equation (1) is calculated by multiplying a smoothing factor (subtracted from one) times the previous rms value and then adding the absolute value of the input value times this same smoothing factor. The smoothing factor α may be selected from one of two values, αatt or αdec depending on whether the absolute value of the input signal is greater or less than the previous rms value.
The problem with such a simple rms detector is that it not only tracks background noise, but also speech, scratch, and wind noise. As illustrated in FIG. 2, the outer darker line 210 represents a speech signal, with occasional spike noise 220 as shown. The lighter line 230 represents the rms signal, calculated with a slow attack and fast decay, as shown in Equation (1). As can be seen in FIG. 2, the rms value 230 calculated using Equation (1) ends up tracking these spike signals 220, which maybe undesirable for an adaptive noise cancellation (ANC) circuit. By tracking the spike signals 220, the ANC circuit may end up generating inappropriate anti-noise, and as a result, create artifacts in the reproduced audio signal for the user.